Extensible memory file layers — registry-driven, decoupled, layer-aware#820
Merged
Extensible memory file layers — registry-driven, decoupled, layer-aware#820
Conversation
Memory files now follow the same registration pattern as handlers and step types: rich metadata, WordPress filter hooks, and a single registry as the source of truth. MemoryFileRegistry: - Each file specifies layer (shared/agent/user), protection status, label, and description - datamachine_memory_files action hook for third-party extensibility - All core files (SITE.md, RULES.md, SOUL.md, MEMORY.md, USER.md) register through the same API plugins use CoreMemoryFilesDirective: - Driven entirely by the registry — no hardcoded file lists - Resolves each file to its layer directory at runtime MemoryFilesReader: - Pipeline/flow memory file injection now resolves layer from registry - Fixes: files selected from shared/user layers in the picker now work at execution time (previously only checked agent directory) AgentFileAbilities: - Write and upload support explicit layer parameter - Layer resolution: explicit param > registry layer > agent (default) - Delete uses registry-driven protection instead of hardcoded constant - List response includes protected, registered, label, description FileConstants: - Delegates to MemoryFileRegistry for protection and layer checks - Legacy constants kept for backward compatibility Frontend: - AgentFileList uses file.protected from API instead of hardcoded array - MemoryFilesSelector uses registered+protected flags from API instead of hardcoded EXCLUDED_FILES list
Homeboy Results —
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Memory files now follow the same registration pattern as handlers and step types: rich metadata, WordPress hooks, and a single registry as the source of truth.
datamachine_memory_filesaction hook provides the third-party extension pointBefore → After
Architecture
Files changed (10)
MemoryFileRegistry.phpdatamachine_memory_filesaction hookbootstrap.phpCoreMemoryFilesDirective.phpMemoryFilesReader.phpAgentFileAbilities.phplayerparameter; delete uses registry protectionFileConstants.phpAgentFiles.php(REST)FileConstants::is_protected()instead ofin_array()AgentFileList.jsxfile.protectedfrom API instead of hardcoded arrayMemoryFilesSelector.jsxregistered + protectedflags from API instead of hardcodedEXCLUDED_FILESwordpress-as-agent-memory.mdKey behavior changes
layerparameter — registered files route to their registered layer; new files can target any layerTesting
php -l